package com.happy3w.ssp.schoolmatehome.component.html;

import org.apache.commons.text.StringEscapeUtils;

import java.util.Arrays;
import java.util.List;

public class HtmlHelper {
    public static List<String> html2plainText(String html) {
        return Arrays.stream(html.replaceAll("<p>", "")
                .split("</p>"))
                .map(StringEscapeUtils::unescapeHtml4)
                .toList();
    }
}
